<!-- header -->
<%
	String redirect = (String) request.getAttribute("redirected_from_home");
	if( redirect == null || !redirect.equalsIgnoreCase("true") ) {		
		response.sendRedirect("/writeonproject/home");
	}

	if( request.getAttribute("userid") == null ) {
	    response.sendRedirect("/writeonproject/home");
	} 
	
	String user = (String) request.getAttribute("userid");
%>

<jsp:include page="header.jsp">
	<jsp:param name="title" value="My Subscriptions"/>
</jsp:include>

<script type="text/javascript" src="js/subscriptions.js"></script>
<script type="text/javascript">window.onload=subUpdateInit;</script>
<!-- / header -->

<!-- content -->
	<div class="body7">
		<div class="main">
			<section id="content">
				<div class="wrapper">
					<article>
						<div class="pad1">
							<h2>Subscriptions</h2>
						</div>
					</article>
				</div>
				<div class="wrapper">
					<article class="col1">
						<div class="pad1">
							<select id="sortBy">
								<option value="stories">Subscribed Stories</option>
								<option value="users">Subscribed Users</option>
							</select>
						</div><br>
					</article>
				</div>
				<div class="wrapper">
					<article>						
						<div class="pad1">
							<div id="stories" class="ranks">
								<table class="story_list">
									<thead>
										<tr>
											<th class="story_col1 left_col">Story Title</th>										
											<th class="story_col2 left_col">Creator</th>
											<th class="story_col3">Posts</th>
											<th class="story_col4 left_col">Last Post</th>
											<th class="story_col5"></th>
										</tr>
									</thead>
									<tbody id="story_subs"></tbody>
								</table>
								<div id="nostories"></div>
							</div>
							<div id="users" class="ranks">
								<table class="story_list">
									<thead>
										<tr>
											<th class="story_col1 left_col">User ID</th>										
											<th class="story_col2 left_col">Date Created</th>
											<th class="story_col4 left_col">Last Updated</th>
											<th class="story_col5"></th>
										</tr>
									</thead>
									<tbody id="user_subs"></tbody>
								</table>
								<div id="nousers"></div>
							</div>
						</div>
					</article>
				</div>
			</section>
		</div>
	</div>
	<!-- / content -->

<!-- footer -->
<jsp:include page="footer.jsp"/>
<!-- / footer -->